<?php
/**
 * Created by LíJimpéy(：
 * User: jimpey88
 * Date: 2024/4/25
 * Email: < jimpey@qq.com >
 * Project: AuthCheck.php
 */

namespace app\backend_api\services;

use app\backend_api\model\AdminMenus;

class AuthService
{

    public static function getSelectLists()
    {
        return list_to_tree(AdminMenus::field('id,menu_name,parent_id')->select()->toArray());
    }

    public static function getAllMenus()
    {
        return list_to_tree_recursion(AdminMenus::select()->toArray());
    }

}